import { createApp } from 'vue'
// import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import '@/styles/dark-variable.scss'
import '@/styles/index.scss'
import '@/styles/element-plus.scss'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import {useDark, useToggle} from '@vueuse/core'
import { createPinia } from "pinia"

const app = createApp(App)
app.use(router)
app.use(ElementPlus, {size: 'large'})
 
const isDark = useDark()
const toggleDark = useToggle(isDark)
if(isDark.value == false) {
    toggleDark()
}

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(createPinia()).mount('#app')

